import request from "@/utils/request";
import { getParamsSuffix } from "@/utils/paramsUtils";
/**
 * 集合数据
 * @returns {Promise<any>}
 * @param params
 */
// export async function getDataScreen(params) {
//   return request(`/api/cdcerservice/v1/datascreen/getDataScreen`,{
//     method: 'POST',
//     requestType: 'form',
//     data: { ...params },
//   });
// }

/**
 * 点击地图板块获取对应地区本月份的三癌总数
 * @returns {Promise<any>}
 * @param params
 */
// export async function getAreaCancerCount(params) {
//   return request('/api/cdcerservice/v1/datascreen/getAreaCancerCount', {
//     method: 'POST',
//     requestType: 'form',
//     data: { ...params },
//   });
// }


/**
 * 集合数据
 * @returns {Promise<any>}
 * @param params
 */
export async function getDataScreen(query) {
  const params = getParamsSuffix(query);

  return request(`/api/cdcerservice/v1/workReport/getScreenData?${params}`, {
    method: 'GET',

  });
}

/**
 * 点击地图板块获取对应地区本月份的三癌总数
 * @returns {Promise<any>}
 * @param params
 */
export async function getAreaCancerCount(params) {
  return request('/api/cdcerservice/v1/datascreen/getAreaCancerCount', {
    method: 'POST',
    requestType: 'form',
    data: { ...params },
  });
}


/**
 * 选择医院是触发的接口
 * @returns {Promise<any>}
 * @param params
 * 
 */
export async function getHospitalDataInit(params) {
  return request(`/api/cdcerservice/v1/workReport/getHospitalDataInit`, {
    method: 'POST',
    requestType: 'form',
    data: { ...params },
  });
}
export async function getCityByHospital() {

  return request(`/api/cdcerservice/v1/workReport/getCityByHospital`, {
    method: 'GET',
  });
}